from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
import time


#获取浏览器对象
browser =  webdriver.Chrome()
browser.get("https://jenkins.baidu.com/")
# username  = browser.find_element(By.XPATH,'//*[@id="app"]/div/div/div[2]/div[2]/div/form/div[1]/div/div/input')
username  = browser.find_element(By.XPATH,'//input[contains(@placeholder,\'请输入用户账号\')]')
username.send_keys('wangjun')

password  = browser.find_element(By.XPATH,'//input[contains(@placeholder,\'请输入用户密码\')]')
password.send_keys('Wj123456*')

login = browser.find_element(By.XPATH,'//*[@id="app"]/div/div/div[2]/div[2]/div/form/div[3]/div/button')
login.click()


time.sleep(10)
browser.close()
